package com.wudizaba.pg.domain.QUery;


import lombok.Data;
import lombok.experimental.Accessors;

@Accessors(fluent = true)
@Data
public class PageQuery {
    public int page;
    public int size;

    public PageQuery() {
        this.page = 1;
        this.size = 10;
    }

    public PageQuery(int page, int size) {
        this.page = page;
        this.size = size;
    }

    public int getPage() {
        if (page < 1) {
            page = 1;
        }
        return page;
    }
    public int getSize() {
        if (size < 1) {
            size = 10;
        }
        return size;
    }
}
